import 'dart:convert';

import 'package:flutter/material.dart';
import 'package:robot3/widgets.dart';

void main() {
  runApp(const MaterialApp(home: _SecondScreen()));
}

class _SecondScreen extends StatelessWidget {
  const _SecondScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('每日进阶')),
      body: RobotButton(
        onClick: (text) {
          showMessage(context: context, text: '每日进阶');
        },
      ),
    );
  }
}

class MyCustomForm extends StatelessWidget {
  const MyCustomForm({super.key});

  @override
  Widget build(BuildContext context) {
    return IconButton(
      padding: EdgeInsets.zero,
      splashRadius: 1,
      highlightColor: Colors.tealAccent,
      // 设置高亮颜色
      splashColor: Colors.red,
      // 设置波纹效果颜色
      icon: Icon(Icons.search, size: 30, color: Colors.blue),
      onPressed: () {
        print('Search icon clicked');
      },
    );
  }
}
